Install python dependencies into mastodon-blender-view/libs/ folder, fixes #20#38
Draft
maarzt wants to merge 3 commits into
Draft
Install python dependencies into mastodon-blender-view/libs/ folder, fixes #20#38maarzt wants to merge 3 commits into
maarzt wants to merge 3 commits into
Conversation
Blender installs the Mastodon Blender View addon into a specific folder. On linux for example: ~/.config/blender/4.4/scripts/addons/mastodon_blender_view/ This commit changes the addon installation process to install it's dependencies in a "libs" subfolder. For example: ~/.config/blender/4.4/scripts/addons/mastodon_blender_view/libs/ Previously the dependencies where installed into a globel folder. Online discussions suggest that the new behavoir is a better practice. It's still following Blenders best practice for addons, which would deploy wheels with the addon. Using this location hopefully solves two issues. - "Portable Blender" is no longer required. - Installation problems on some Windows machines would be fixed.
Collaborator
Author
|
The "Setup Mastodon Blender Addon" in Mastodon fails when running "test addon", resulting in an exception the "grpc" could not be imported. I guess the command for testing would need to be updated to change the sys.path, but I don't like that either. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The python dependencies:
are now installed into folder that Blender choses for the "mastodon-blender-view". Into a subfolder called
libs/.This way to install dependencies is the preferred way for Blender Addons prior to Blender 4.2. see here
(Big thanks to @smlpt and @ChrisMzz, for reporting and investigating installation problems #20 and #36.
@ChrisMzz suggested that providing a proper target folder (flag
--target) hen runningpip install, fixes some installation problem. However the question what is a proper target folder remains. PR #36 now implements it's own rule of thumb for determining the target, which would probably work.)The cleanest way to solve issue #20 would be to follow the Blender Manual, and deploy dependencies as wheels. see Blender Manual - Python Wheels
This would however drastically increase the effort for deploying the Mastodon Blender plugin. And only newer Blender version would be supported Blender > 4.2.